home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Matrix
/
effect2.txt
Wrap
Text File
|
2004-03-08
|
2KB
|
59 lines
// main_init function
main_init = function(mc){
box = function(mc,tl_x, tl_y, br_x, br_y, cf ){
mc.lineStyle();
mc.beginFill(cf);
mc.moveTo (tl_x,tl_y);
mc.lineTo (br_x,tl_y);
mc.lineTo (br_x,br_y);
mc.lineTo (tl_x,br_y);
mc.endFill();
}
random_letter = function(i){
o = new object();
o._x = Math.floor(mc._width * (Math.random()-.5) / col_width) * col_width;
o._y = Math.floor(mc._height * (Math.random()-.5));
o._alpha = 40 + Math.floor(Math.random() * 50);
o._xscale = o._yscale = 50 + Math.floor(Math.random() * 40);
$smc[Math.floor(Math.random()*$sub_cnt)].duplicatemovieclip("rmc"+i,-i,o);
clr = new color($mmc["rmc"+i]);
clr.setrgb(letter_color);
}
subs_done = true;
for(i=0;i<$sub_cnt;i++) col_width = math.max(col_width,$smc[i]._width);
col_width = col_width - $padding + colspace;
createemptymovieclip("mask",6);
mc.setmask(mask);
hh = math.ceil((mc._height-$padding) / 2) + 10;
hw = math.ceil((mc._width-$padding) / 2) + 10;
box(mask,-hw,-hh,hw,hh,0);
for(i=0;i<letters;i++){
random_letter(i);
if (start_blank) $mmc["rmc"+I]._xscale = 0;
}
}
// main_effect function
main_effect = function(mc,frame){
for(i=0;i<letters;i++){
rmc = $mmc["rmc"+i];
rmc._alpha-= alpha_decrease_speed;
rmc._y+= fall_speed;
if (((rmc._y - (rmc._height-$padding) / 2) > hh)||(rmc._alpha<1)) random_letter(i);
}
}
// sub_init function
sub_init = function(mc){
if(!text_visible) mc._alpha = 0;
}
// sub_effect function
sub_effect = function(mc,frame){
}